package com.sit.dao;

import com.sit.pojo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Repository
public interface ReadersMapper {
    public Readers login(String id);
    public int addReader(Readers readers);
    public Readers findReaderById(String id);
    public int updateReader(Readers readers);
    public int updateReaderPass(Readers readers);
    public int addReaderCard(js_card card);
    public int deleteReaderCard(@Param("readId")String id);
    public js_card findReaderCard(String id);
    public List<books> findBookByName(String name);
    public int borrowBook(@Param("readId")String readId,@Param("bookId") String bookId);
    public int renewBook(@Param("readId")String readId,@Param("bookId") String bookId,@Param("duedate") Date duedate);
    public int returnBook(@Param("readId")String readId,@Param("bookId") String bookId);
    public List<borrow> getBorrow(String readId);
    public List<hisborrow> getHisBorrow(String readId);
    public List<punish> getPunish(String readId);
    public List<books> BookTopFive();
    public List<Readers> ReaderTopFive();
    public borrow getBorrowInfo(@Param("readId")String readId,@Param("bookId") String bookId);
    public punish getPunishInfo(@Param("readId")String readId,@Param("bookId") String bookId);
    public List<books> findBookByInput(books book);
    public List<books_type> findBookTypeByInput(books_type bookType);
}
